
<ul class="com-list-info alarmtpl-info">
  <li><span class="info-name">报警类型</span><span class="info-simple">{{config.templateType=='deploy'?'容器':'主机'}}</span></li>
  <li ng-if="config.templateType=='host'"><span class="info-name">报警主机组</span><span ng-if="config.hostGroupList.length===0" class="info-simple">无</span>
    <div ng-if="config.hostGroupList.length!==0" class="info-content">
      <ul>
        <li ng-repeat="hostgroup in config.hostGroupList" class="ui-label"><a ng-bind="hostgroup.hostGroupName"></a></li>
      </ul>
    </div>
  </li>
  <li ng-if="config.templateType=='deploy'"><span class="info-name">报警容器</span>
    <div class="info-content deploy-option">
      <input readonly="readonly" ng-value="config.deploymentInfo.clusterName||'无集群'" class="ui-input ui-input-white ui-btn-select tool-nowrap select-env select-cluster"/>
      <input readonly="readonly" ng-value="config.deploymentInfo.hostEnv=='PROD'?'生产':'测试'" class="ui-input ui-input-white ui-btn-select tool-nowrap select-env"/>
      <input readonly="readonly" ng-value="config.deploymentInfo.deploymentName||'无部署'" class="ui-input ui-input-white ui-btn-select tool-nowrap select-env"/>
    </div>
  </li>
  <li><span class="info-name">报警逻辑</span>
    <div class="info-content">
      <div ng-repeat="strategy in config.strategyList" class="line-single alarm-rule">
        <ul>
          <li><span>选择报警指标</span>
            <input ng-model="alarmTemplateIns.keyMaps.metric[strategy.metric].text" readonly="readonly" class="ui-input ui-input-white c1"/><span ng-bind="tagName=alarmTemplateIns.keyMaps.metric[strategy.metric].tagName" ng-show="config.templateType!='deploy'" class="c3"></span>
            <input ng-value="strategy.tag||'全部'" ng-if="tagName&amp;&amp;config.templateType!='deploy'" readonly="readonly" class="ui-input ui-input-white c2"/>
          </li>
          <li>
            <div ng-if="strategy.metric=='agent_alive'" class="l3">当agent最近
              <input ng-model="strategy.pointNum" readonly="readonly" class="ui-input ui-input-white ui-input-sm agent-point"/>次检测
              <input ng-model="alarmTemplateIns.keyMaps.aggregateTypeAgent[strategy.aggregateType]" readonly="readonly" class="ui-input ui-input-white c8"/><span>表现为“未存活”时，发送报警</span>
            </div>
            <div ng-if="strategy.metric!='agent_alive'" ng-cloak="ng-cloak" class="l3">该指标最新的
              <input ng-model="strategy.pointNum" readonly="readonly" class="ui-input ui-input-white ui-input-sm"/>个监控值，
              <input ng-model="alarmTemplateIns.keyMaps.aggregateType[strategy.aggregateType]" readonly="readonly" class="ui-input ui-input-white c6"/>
              <input readonly="readonly" ng-model="strategy.operator" class="ui-input ui-input-white c7"/>
              <input readonly="readonly" ng-model="strategy.rightValue" class="ui-input ui-input-white ui-input-sm c10"/>{{alarmTemplateIns.keyMaps.metric[strategy.metric].unit}}时，发送报警。
            </div>
          </li>
          <li>邮件/短信的报警文字为：
            <input readonly="readonly" ng-value="strategy.note||'未设置'" class="ui-input ui-input-white c5"/>最大报警次数
            <input readonly="readonly" ng-model="strategy.maxStep" class="ui-input ui-input-white ui-input-sm"/>次<a tooltip="当连续报警次数达到最大报警次数时，即使没有恢复，也不会再发送报警" class="icon-help"></a>
          </li>
        </ul>
      </div>
    </div>
    <li><span class="info-name">报警模板名称</span><span ng-bind="config.templateName" class="info-simple"></span></li>
    <li><span class="info-name">报警用户组</span><span ng-if="!config.userGroupList||config.userGroupList.length===0" class="info-simple">无</span>
      <div class="info-content">
        <ul>
          <li ng-repeat="group in config.userGroupList" ng-bind="group.userGroupName" class="ui-label"></li>
        </ul>
      </div>
    </li>
  </li>
</ul>